1. Technical Field
The present invention relates to a data storage processing apparatus operable in a printing apparatus. The data storage processing apparatus stores and maintains data including printing-associated information updated during the operation of the printing apparatus in a non-volatile storage unit. The present invention also relates to a printing apparatus and a data storage processing method.
2. Related Art
Japanese Patent Documents JP-A-2005-193593 and JP-A-2003-19818 disclose printing apparatuses which store data such as ink remaining amount information in a non-volatile memory.
For example, the recording apparatus disclosed in JP-A-2005-193593 includes a first non-volatile memory mounted on a recording head and a second non-volatile memory mounted on an ink tank, and a technique of copying contents of the second non-volatile memory mounted on the ink tank into the first non-volatile memory mounted on the recording head is disclosed. At the printing ending time, the recovery operation completion time, or the like, where an operation is performed where ink consumed, the contents of the second non-volatile memory of the ink tank and the contents of the first non-volatile memory of the recording heads are simultaneously rewritten. Therefore, although the rewriting of the data into the second non-volatile memory of the ink tank fails due to an accidental manipulation such as detachment of the ink tank during the data writing, the contents of the second non-volatile memory of the ink tank may be recovered by using the contents of the first non-volatile memory of the recording head.
In addition, JP-A-2003-19818 discloses a printing apparatus which calculates an ink remaining amount when one-page printing is completed and then writes the calculated ink remaining amount back to a non-volatile memory (EEPROM). Next, when a power down command is output, the data of the ink remaining amount in the non-volatile memory are written in a non-volatile storage device of an ink cartridge.
However, since the writing-back of the data from the RAM or the non-volatile memory into another non-volatile memory (non-volatile storage device) is performed at the power-off time, when electricity failure occurs or a power plug is unplugged, the writing-back process is necessarily completed in a short time (for example, a discharging time of a condenser having a secondary battery function) until the power is shutdown. In this case, a problem where the writing-back of the data is not completely performed so that old data is mixed in a portion of the non-volatile memory.
In this manner, in the case of the configuration using a non-volatile memory such as an EEPROM of which the writable number is limited, when the power down command is output, the writing-back of the data is limited to the case of the ink cartridge replacement time or the like. Therefore, the aforementioned problem occurs. Recently, a non-volatile memory such as an FeRAM having a durability so that there is substantially no limitation in the writable number has also been used. In these cases, updated data such as ink remaining amount sequentially updated are stored in an RAM, so that it is possible to write the data in the non-volatile memory with a writing frequency lower which is than that of the RAM.
However, at the accidental power shutdown time, when the writing-back of the data from a storage unit (second storage unit) which is one of the RAM, the non-volatile memory, and the like to another storage unit (first storage unit) constructed with a non-volatile memory is performed, the power supplying is prematurely stopped, so that the writing-back process of the data from the second storage unit to the first storage unit may be halted during the process. In this case, there is a problem in that the data where new data up to the stopping of the writing-back are incorrectly connected to the previous-time old data, of which the updating is not completed through the writing-back, are stored in the non-volatile memory. For example, when the boundary between the new and old data is corresponds to a single piece of one information, the information becomes incorrect.
If the power is shutdown in the state where incorrect data is stored in the non-volatile memory (first storage unit), there may be difficulties at the next power-on time, wherein, for example, the ink remaining amount information acquired based on the incorrect data read from the non-volatile memory may be different from the actual ink remaining amount. In this case, there is a problem in that the ink remaining amount information may indicate that there is ink remaining in the apparatus although there is not actually any ink remaining, so that ink disconnections are formed during the printing. Other problems may occur when there is ink remaining in the apparatus although the memory indicates that there is no ink remaining, so that the printing operation is forcibly stopped or an error occurs. It goes without saying that, since various data as well as the ink remaining amount are stored in the non-volatile memory (first storage unit), problems occurring due to the incorrect data differ according to the type of the data.